package com.cscec5b.inspection.ping;

import org.springframework.web.bind.annotation.*;
import java.util.Map;

@RestController
@RequestMapping("/ping")
public class PingController {
    @GetMapping("/")
    public Map<String, Object> ping() {
        return Map.of("ok", true, "ts", System.currentTimeMillis());
    }

    @GetMapping("/now")
    public Map<String, Object> now() {
        return Map.of("epochSecond", java.time.Instant.now().getEpochSecond());
    }

}